package com.wolfking.jeesite.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wolfking.jeesite.entity.SysKvCache;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 系统kv缓存的mapper映射
 * <p>
 *
 * @author wolfking@赵伟伟
 * @mail zww199009@163.com
 * @创作日期 2017年4月25日下午3:21:27
 * @版权 归wolfking所有
 */
@Mapper
public interface SysKvCacheMapper extends BaseMapper<SysKvCache> {

    @Select("select * from sys_kv_cache where `cache_key` = #{key}")
    SysKvCache selectByKey(@Param("key") String key);

    @Delete("delete from sys_kv_cache where `cache_key` = #{key}")
    void deleteByKey(@Param("key") String key);
}
